skip directories and other non-note files

Found script unusable, here is fix