Dumps the object to disk with given name and extension.
    Optionally the path can be specified as well. (But nothing stops
    you from adding path to the name.

def dump(obj, name, path=None, ext="dat", overwrite=True, silent=False):
    """
    Dumps the object to disk with given name and extension.
    Optionally the path can be specified as well. (But nothing stops
    you from adding path to the name.
    """
    if path and os.path.isfile(path):
        raise ValueException("Specified path is a file.")

    filename = __get_filename(path, name, ext)
    
    if not overwrite and os.path.exists(filename):
        if not silent:
            raise ValueException("Specified output filename already exists.")
        return
    
    with open(filename, "wb") as f:
        pickle.dump(obj, f)