Use java card ant classes instead of calling executables directly

This also introduces test and hence fixes #1
@slomo I think this comment is outdated?