Fixed python 2.6 incompatibility; added possibility to list only jobs with given statuses.