fix bug when there is no file extension.
fix bug when there is no file extension.

This was spotted by a segmentation faults on systems where sprintf()
don't handle NULL as "%s" (Solaris, BSDs), but it makes no sense to
lookup "*(null)" as extension on Linux either.

Reported by: mcalamell



git-svn-id: 6ac5796aeae0cef97fb47bcc287d4ce899c6fa6e@40120 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

jordemort/e17,jordemort/e17,jordemort/e17