Fallback to default path if current directory doesn't exist.
Merge pull request #4316 from shenweip/patch-12

Fallback to default path if current directory doesn't exist.