fixes #3
This fixed #3 and added unit tests.
Fixes #3 by adding support for php >=3.7
Added .gitattributes for lineendings normalization and included feature add for #3 in the readme.