fixed bad cast in tests,
added tests.env to tests
fixed debian control file