Sanitize path also for regular ones
Refactor code (DRY)
Merge pull request #5 from asaaki/hotfix/sanitize_regular_path

Sanitize path also for regular ones