Simplify FileUtil's Copy and GetSize functions.

Also more general, rather than platform-specific code.
Directories can be valid, but the same behavior will happen no matter which conditional is first in regards to how we handle it. I'll move the IsDirectory check to be first when I get off work though; I realized we can just sanitize the given filename before creating the stream object. Thanks for pointing that out.