Fix some bugs. (4.1.1)

The Twitter sanitizer was not properly removing unusable (but valid)
mediums (i.e. “sound” and “video”). Also, since whitespace is now
stripped from the ends of the query before checking for a valid
keyword/location, a conditional needed to be updated. Elsewhere, a bug
was found in the __main__ script where the media parameter was not
handled correctly for some unknown reason. In the query handler, an
improper conditional allowed queries with no requested media. Some
tests were also corrected and verified.