Actually pass the directory to the function.