license -> MIT. Added fixperms function.