Fixes issues #23 and #24
Some fs fixes, as mentioned in issue #12