Improved makefile

Fixed a few possible issues with the makefile. Also, it now uses
unix-friendly commands, like 'rm' instead of the windows 'del'.