Normalize mirror directory

User input was not being checked in any way. "mirror" must not have a trailing
slash, while "mirrordir" must have a trailing slash before it is encoded.

This is to match up with "setup-x86_64.exe" installer.