def to_bin(path):
    """Convert to binary if not already

    We want paths to be binary since we can't assume an encoding but
    it shall still be convenient to pass in unicode strings
    """
    return path.encode() if not isinstance(path, bytes) else path
