Fix to getUniqueFile(...) method.