Fix URI::InvalidURIError when using Capybara::Session#current_path for url with space