Progress on watchdir

Not working yet, but the structure is in place.