Optimize call to condor_history.

Resolves #302. Contributed by Kevin Shieh, thanks!