fixes #353, ignoring directories, yay API already there!