Changed the pom filename to pom.xml and added code to make the file
read only if it initially was read only
Made the file read only again only if it initially was read only