'Return the path to a device, first checking to see if either it
is a proper mount point, or at least a directory depending on
the mount_check configuration option.
:param device: name of target device
:param mount_check: whether or not to check mountedness of device.
Defaults to bool(self.mount_check).
:returns: full path to the device, None if the path to the device is
not a proper mount point or directory.'

def get_dev_path(self, device, mount_check=None):

    if (mount_check is not False):
        if (mount_check or self.mount_check):
            check = check_mount
        else:
            check = check_dir
        if (not check(self.devices, device)):
            return None
    return os.path.join(self.devices, device)
