Suggested Makefile/.gitignore changes

Hi, I changed the linking order in the Makefile and added a .gitignore file. There were problems linking with GCC 4.6.3 if -lz was added as a flag before the object files.