Allow share_url and direct_url to be used on directories as well as files

Currently, the share_url and direct_url methods are a part of the File object, but these methods are also valid on Dir objects. Since the Fileops module is included by both, moving the methods there brings support for URLs to both types of objects.