Use java card ant classes instead of calling executables directly

This also introduces test and hence fixes #1