Fixes Issue #274
null pointer exception in getElement.
We were retrieving the file extension on a project, which is null and
then checked for equality with an extension string.
THe test now uses the extension as parameter and we only do it for IFile
instead of IResource.