Some changes from Andriy.
Rob's filesystem-events.d script.