fix slowness in large git repo; fix realpath command name on Linux