Fixed up the compilation script.  Permissions are still funky, though.