FileUtils: Use a tempdir for the path_or_empty on an existing dir test.

'/tmp' does not exist on all systems, use a tempdir instead. Ref #194
Mock open_file in D2::Core::Request::Upload namespace in test

On most platforms altering the coderef for D2::FileUtils::open_file
via glob assignment doesn't alter references where that code has been
imported into other namespaces, such as D2::Core::Request::Upload.
Win32 is one exception; in which case D2::Core::Request::Upload::open_file
was actually being mocked, highlighting a broken test case.

Mock D2::Core::Request::Upload::open_file to always croak (rather than
returning 0 and expecting it to behave like a file handle), and undo
the mock once finished that portion of the test. Ref #194.
Merge pull request #215 from veryrusty/bugfix/win32

Test case fixes for Win32 fails from #194