added a chmod on mkinstalldirs just before using it, otherwise it