Merge pull request #1 from zeha/master

Production quality
fix off by one in parameter parser
expand Makefile for better integration with autotools