Fix jruby error on Pathname#relative_path_from

My fault on https://github.com/guard/listen/pull/115

Go back to the regexp substitution and force both path and directory encodings before substitution.

The regexp is a bit different (need more specs?):

- `^` match line begin, should be `\A` for string begin
- `#{File::SEPARATOR}?` may get path "/ab" recognized as "b" under directory "/a"