#48: use dirname if git has incorrect repo url.