Refactoring LogWatcher.

Allow this to be used to monitor processes other than Jenkins. Use more Java like primitives