Replaced deprecated current_path with the Url controller

Issue reported on last comment of the port issue on DO: https://www.drupal.org/node/1962358#comment-9448705

current_path() has been removed from Drupal core, here is the change record: https://www.drupal.org/node/2382211

I replaced the only two calls to the function.