Sanitize path properly