cleaned up code of parsing location header on response
Added test for case when location header comes back and we are not able to parse