added possibility to ignore directories

will be improved sometime later