Fixed `main.coffee` tests. Alllow setting extension directory via env var.