Fix non-file candidates containing path characters