Preserve proper exit status when running tests