Fix for #94

Checks if listFiles returns null before using it. Hotfix for issue #94 on 1.7.6 and newer.