Fix wrong output by class method 'folderContains'.

- In some cases the method failed to find existing files. This caused jobs to be notified as 'failed' even though they actually finished successfully.