Throws up an error in some cases. Error:
[Errno 2] No such file or directory: ''
The earlier version left a stack trace- this one doesn't.
I suspect it has something to do with spaces in the path (the path to 'pwd', not the "path" argument. Could be both.)
Edit: Apparently changing the path to a no-space one doesn't help. FYI.