Add nil check to any? method. Fixes #510.

Makes :linked_files and :linked_dirs optional.
Merge pull request #513 from ain/patch-3

Add nil check to any? method. Fixes #510.