when feeding URL:s from a file, create basedir the same as the filename, closes #342