Fix test bug on Unix
Fix a commands bug on sub directory
Fix command bugs on sub directory