modified plexWatch.pl for win32/linux