Cache deployment script

Fixes #459

Also fixed a test which used d:\.