generic watchdir script that allows for more than one watchdir