Better handling flags in stream wrapper errors

PHP stream wrappers provide flags to url_stat that should be used to determine
the response of a call and whether or not it raises an error. I've updated the
Amazon S3 stream wrapper to utilize these combinations of flags to emulate the
error handling of the "http" protocol stream wrapper.

Closes #268
Merge pull request #276 from aws/fix_is_link

Better handling of error flags in S3 stream wrapper