go back to regexp implementation for relative_to_base, and force both binary encoding before substitute. because Pathname#relative_path_from behaves different in JRuby