aws/aws-cli — pull request #1002 by quiver (2014-11-13 17:27:12+00:00)
Title: Fix iam create-virtual-mfa-device to work with relative output paths.

http://docs.aws.amazon.com/cli/latest/reference/iam/create-virtual-mfa-device.html

If you specify output filename with relative path for iam-CreateVirtualMFADevice, you end up with write error
```
$ aws iam create-virtual-mfa-device --virtual-mfa-device-name test --bootstrap-method QRCodePNG --outfile QRCode.png
Unable to write to file: QRCode.png
```
If you specify absolute path(like `/tmp/QRCode.png`), this works just fine.

This is because `aws` checks for `outfile`' s write availability before it actually writes to it, and this is done through `outfile`'s parent directory's write permission. So if you cannot restore `outfile`'s parent path from given argument, `os.access(parent_dir, os.W_OK)` always fails.