Fix travis failures in fileutils due to smarter tmpdir.

Travis started failing after we updated tmpdir to allow using a
world-writable dir if sticky bit is set. The bug that was exposed
lies in FileUtils.remove_entry_secure, where it attempts to open
the "." entry in the target directory primarily to stat, chmod,
and chown it. Because JVM cannot open a stream to a directory
entry, JRuby can't do it either, and because we started allowing
tmpdir to use sticky-bit world-writable dirs, this logic started
getting hit for Dir.mktmpdir's cleanup.

The fix was to directly stat, chown, and chmod the "." entry
rather than opening it as a file, since these operations end up
equivalent.

Note of clarification: this issue has always existed, but most
uses of remove_entry_secure were either already in secure dirs
(non-world-writable) or insecure dirs with no sticky bit (in
which case remove_entry_secure raises an error, correctly). It
only became apparent because of the recent tmpdir change.