Set path safely for exists() check. Fixes #2