use standard make mechanism to build
fix open calls

only fopen would take "r" as string, but 'r' is an integer
that maps to RDWR|O_CREAT, which makes it fail to read a .wav from ro mounts
Merge pull request #2 from bmwiedemann/forupstream

fix open calls, nicify Makefile