SECURITY: Fix extension detection with 2 .'s