added command line options, glob expansion of file patterns, and properly posting all passed files