resources.py: resolve json decode exception in resources
The problem with select_from_json() wasn't fixed. By splitting on the newlines, we were adding an empty item to the list of records, which was causing JsonDecode to fail since it's invalid.
This fix horses the string that's sent to json.loads() into something resembling valid json for listing available buckets without interfering with the code to handle verifying the tokens.
Signed-off-by: Kelley Spoon kelley.spoon@linaro.org