Copied from https://logstash.jira.com/browse/LOGSTASH-429. There seems to be a potential upstream fix to the ruby-filewatch gem which would fix this. See https://github.com/jordansissel/ruby-filewatch/pull/32