Formatting cleanup, fix test, add new test, and cleanup safely after test run
use srcDir function and rename variables slightly more logically
Merge pull request #4 from jonboulle/master

Formatting cleanup, fix test, add new test, and cleanup safely after test run