Make test pass

fixes #30
Fix test bug on Unix
Fix a commands bug on sub directory
Fix command bugs on sub directory
Merge branch 'fix-win-bug'