Use mkdir -p to recursively create directory tree

Change-Id: I9377a4d6966960b6447e6a20e64cdd8468e8c2d9
urlencode request parameters

Change-Id: Ife988d942eea06ca6a9a48344c6daf2c31f07e6c