Fix mmap check on Mac OS.

On Mac OS the system reports a nonzero size when you stat stdin. We
assumed this would always be 0 for files that cannot be mmap'd. This
caused "dx upload -" to fail on Macs.

Fix this check by replacing it with checks on the stat mode.