Fix upload from STDIN and Python2.5 compatibly 

This fixes compatibility issues with Python 2.5's inability accept a `*glob` followed by keyword args to a function.

This also fixes some errors which caused upload to S3 from STDIN to fail, including a pass-by-ref var being overwritten and a variable being used before it was defined.