implemented --exitcode method

Signed-off-by: Niels Fallenbeck <niels@fallenbeck.com>