Edit/delete file path should pointing to the same site

* Fix "Unable to select files from files library" bug.

Explaining: here I prefer the delegation through url_helpers rather than the include Rails.application.routes.url_helpers. Because when you reading the code you will know that is a rails route in fraction of seconds. But is more like a personal choice.