Merge pull request #27 from robertfeldt/master

Fix for Mac OS X (Darwin)
added more tests