Do not read directory as file

Closes #81