[BUGFIX] Lowercase file extension before checking it

Fixes #6