Add a Makefile to run tests more easily.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Fix ResourceWarning from tests.

This inverted test, besides being wrong (and potentially closing something
important like sys.stdout), caused a ResourceWarning in testgit.py.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Refactor file opening and closing.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Use os.devnull instead of hard-coding path.

Not that newfol is likely to work especially well on non-Unix systems, but
using os.devnull adds a little bit of portability.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Allow exporting to arbitrary formats.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Remove debugging info.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Fix import functionality.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Add JSON as a file format for import and export.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Support YAML as an output format.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>