Calibration code promoted to first class citizen.

Also some test cleanup to use real test dirs.