adding *~ to .gitignore and code of cachematrix.R