Improve test

Using 'exit(1);' instead of 'die;' so it doesn't print unnecessary message to stderr.