Fix a bug with git submodules

Apparently the .git in a submodule is a file, not a directory. find was returning
them and then realpath was spitting out errors trying to access their parent dir