cmd: don't strip leading slashes on writeTarget

Now GetURL strips all leading slashes from the current target.

Fix #508.