clean path in swift middleware

the path also requires encoding as syslogs still show errors.

Closes-Bug: #1369124
Change-Id: Ie4d19a5a7dd5ce29e10c6e082bfcb33e6e641623
(cherry picked from commit dbe8c8b20f4231841d2086fbfd278f3a4cde8324)
Merge "clean path in swift middleware" into proposed/juno