Given a directory, return the corresponding id
Determine the target directory using a base directory and the id.