Fixed potential bug with get_repo_files
I was unable to actually get provoke a failure, still.. added the test case and fixed the "bug"