Creates an empty file at fname, creating path if necessary
    Answer taken from Stack Overflow http://stackoverflow.com/a/1160227
    User: ephemient http://stackoverflow.com/users/20713
    License: CC-BY-SA 3.0 https://creativecommons.org/licenses/by-sa/3.0/

def touch(fname, times=None):
    """Creates an empty file at fname, creating path if necessary
    Answer taken from Stack Overflow http://stackoverflow.com/a/1160227
    User: ephemient http://stackoverflow.com/users/20713
    License: CC-BY-SA 3.0 https://creativecommons.org/licenses/by-sa/3.0/
    """
    fpath, f = os.path.split(fname)
    if not os.path.exists(fpath):
        os.makedirs(fpath)

    with open(fname, 'a'):
        os.utime(fname, times)