Added functionality to rename contents of a flat directory