Fix path_search matching other directories (r -> reg)