Add test for failed_returncodes

When kept_returncodes or repaired_returncodes are specified
failed_returncode is not defaulted properly.
Merge pull request #1736 from nickanderson/redmine/5987

Add test for failed_returncodes