replace system with fork/execl
cleanups
switch to snprintf
add Makefile