This allows to read from a file descriptor instad of a file

* Rewrites some of the tests to use the functionality
Merge pull request #44 from pote/feature/descriptor

This allows to read from a file descriptor instad of a file