Fix: File name longer than current working directory might cause problems. Now commonprefix will return absoulte path if the resulting commonprefix path does not have current working directory as one of its parent directories.