Fix crash when downloading a pseudo-directory

If a user creates an object with name ending with a slash, then
downloading such container ends in a traceback like this:

..............
test5g.file [auth 1.516s, headers 1.560s, total 244.565s, 22.089 MB/s]
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/swiftclient/multithreading.py", lin
    result = self.func(item, *self.args, **self.kwargs)
  File "/usr/lib/python2.6/site-packages/swiftclient/shell.py", line 403, in
    fp = open(path, 'wb')
IOError: [Errno 21] Is a directory: 'first-pseudo-folder/'

The proposed fix is not to save this object. Note that the contents of
the object are available with --output option, as before. Only the
crash is fixed.

Even though we do not use the contents, we download the object and
check its Etag, in case. We also create a corresponding directory,
in case the pseudo-directory contains no objects.

The format of printout is changed, so user realizes easier when
pseudo-directory convention is in effect. Note that this is not a
compatibility issue because previously there was crash in such case.

Change-Id: I3352f7a4eaf9970961af0cc84c4706fc1eab281d
Merge "Fix crash when downloading a pseudo-directory"
fixed unit tests when env vars are set

Change-Id: Ia73c10c7c81b9434895941ea29282dbcdc667556
Do not create an empty directory 'pseudo/'

This is a fix-up for the commit 3d56b65c. The code change was good,
but the additional test had a side effect of creating an empty
directory "pseudo/". Fix this by mocking-out mkdirs().

Change-Id: Iead55e72d8a75d96bde0a7491aca12bbdcc269cf
Merge "fixed unit tests when env vars are set"