Make the veresion of getSubdir which takes environment variables private.