Fix the error handling from HTTP GET/PUT

When performing a GET we want a filename which doesn't already exist.
When performing a PUT we want a filename which does exist.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>