Working directory check.
Run a shell by default.
Fix a crash when a racing process removes a file after path lookup.

Closes #18.