added chmod to end of postflight to ensure file is writable