Fix for `undefined method `map' for nil:NilClass`
Fix for `undefined method `map' for nil:NilClass`

1e799c59187702650253000f80bed67e422acc5f expects that params[:query] is always defined, and also introduced another bug that reassigned params incorrectly 

CBitLabs/fog-aws,esthervillars/fog-aws,tdg5/fog-aws,bahchis/fog-aws,nomadium/fog-aws,engineyard/fog-aws,puneetloya/fog-aws,nalabjp/fog-aws,datapipe/fog-aws,ming-relax/fog-aws,datapipe/fog-aws,fog/fog-aws,ehowe/fog-aws,gswallow/fog-aws,fog/fog-aws,tdg5/fog-aws,backupify/fog-aws,nalabjp/fog-aws,gswallow/fog-aws,backupify/fog-aws,bahchis/fog-aws,puneetloya/fog-aws,nilroy/fog-aws,nomadium/fog-aws,ming-relax/fog-aws,crashlytics/fog-aws,engineyard/fog-aws,fog/fog-aws,alexshepherd-hydrant/fog-aws,ehowe/fog-aws,alexshepherd-hydrant/fog-aws,nilroy/fog-aws,esthervillars/fog-aws