Better handling of slashes in path