Clean filepaths used to look up refs in the `src api` methods

This fixes an issue reported by Shiva where Ruby sources units whose
files are listed as ./file1, ./file2 (instead of just file1 and file2)
would not be matched when using `src api` methods.