resolving TODO, making fix for #49 complete -- had to modify dir() and file() to prevent functional fallthroughs