Fix bug in have_changed to output_only task

When a contest contains output_only task, cmsReimporter throws an error
such that sol is not found.

Fix it by checking the existence of "sol" before listdir.