Fix Signature Does Not Match when mounting Amazon S3 external storage

For some reason the ```aws-sdk-php``` package does not calculate the
signature correctly when accessing an object in a bucket with a name of ```.```.

When we are at the top of a S3 bucket there is a need(?) to have a directory
name.  Per standard Unix the name picked was '.' (dot or period).  This
choice exercises the aws-sdk bug.

This fix is to add a field to the method to store the name to use instead of
'.' which at this point is hard coded to '<root>'.  We also add a private
function ```cleanKey()``` which will test for the '.' name and replace it with
the variable.  Finally all calls to manipulate objects where the path is
not obviously not '.' are processed through ```cleanKey()```.

An example where we don't process through clean key would be
```
	'Key' => $path.'/',
```
Vincent,  at issue is a bug in the aws-sdk for s3 that does not handle
files with a name of '.' correctly.  It also looks like they do not handle
characters that have things like umlaut's in them.  This variable "$root"
is used to hold the name of the root directory.  I.e. if the code
references the "." directory then we will change it to "<root>".

The side affect of this fix is that it is no longer possible to have a file
name of "<root>".




On Fri, Jun 20, 2014 at 3:55 AM, Vincent Petry <notifications@github.com>
wrote:

> In apps/files_external/lib/amazons3.php:
>
> > @@ -53,6 +53,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
> >  	 * @var int
> >  	 */
> >  	private $timeout = 15;
> > +	private $root = '<root>';
>
> @ctjctj <https://github.com/ctjctj> please clarify
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/owncloud/core/pull/8195/files#r14009923>.
>