More robust extending of url patterns

Instead of copying urls.py, only replace the rules that we need.

Change-Id: I08cc0c99b0abaa4a54aa9ecc5ccffacad986121a
Merge "More robust extending of url patterns"