v2.2: Merge pull request #14 from dhenot/master
Main purpose for this release is to include heap buffer overrun fixes found by GitHub user dhenot.
Testing with AFL fuzzer hasn't shown any other similar problems, but there could still be some as fuzzer testing never finishes..
Also changed to using the MIT license & some minor file tidying as suggested by other GitHub users.