copytruncate support

truncation detection for both inotify and polling file watchers along with test cases, plus a fix for issue 5.