Add a minimal test framework and a test revealing file descriptor leakage
Bug fix

- fix file descriptor leak
- fix occasional segfault
- some code reformatting
Bump version
merged pull request from trebb
Merge branch 'trebb-master'
amend merge
add execute bit to configure