Only relink if filename changes
Added darwin support for exception in sanity check
Moved links out of local