Small fix in Rack middleware.
Ruby specific fixes for checking file extensions in the Detector
Add 'Accept-Encoding' header to the Client
Dry up Rack middleware a bit. Do not call next middleware if a response from the API is retrieved.
Small fixes while testing out Rack example with demo credentials.