Switched from dir to prefix, which is more general but a bit less elegant in my opinion. It is needed to support the 'long filenames in shared directory' approach which is favored by thibaut.