Merge pull request #162 from rrthomas/master

Fix calculation of rootDir now that commands are executed directly (fixes #158)