fixes a bug in #28 and fixes #125

on systems with case sensitive file name handling, monitoring throwed an
NPE