Get file monitoring working under Python 3