Introduce the CACHEDIR variable which lets the DATADIR variable get set
correctly.