Improving directory handling and allowing option to ignore specified filenames.