migrated path tests to Mocha, and also correctly fixed #567