Inspired by #1640, this change cleans up the logic used when reading in secrets files, provides clearer warnings when the secrets files can't be parsed, and adds tests for those methods. Signed-off-by: Adam Leff <adam@leff.co>