fix issue of checkout when file is readonly

fix issue of
1: fileSystem.makeFile() operation failed if the file was readonly when trying to checkout.