Append / to the start/end of the mapResources prefix.

This makes the method easier to use and less error prone.

Fixes #2431