Merge pull request #8 from joechung/master

Make sure chdir and mkdir pass on their return value
Add __toString() to Command that prints out safeCommandStr.