Mac version of fixlinks.bat