The gasoline smell - the definitive explanation [SPOILERS]
I've just rewatched this part. He pours gasoline in some parts of the house. It ends. He goes to the basement, gets some chemicals, possibly also alcohol, and begins pouring them in the rest of the house, including the room he's in when the cops arrive. This room is at the front of the house, that the front door opens in. The cops get from the porch straight into this room. All they would smell at this point would be some strange chemicals, so they won't be alerted. And the chemicals could burst easily into flames. Perfectly plausible.
And yes, the main character is a bit nuts. He clearly imagines things in one scene. It's up to you to decide if there are other scenes that also happen only in his head. You may even choose to believe that the entire movie happens in his head, because hey, the guy is crazy.
Me, I think this is a stupid logic and I'd rather look instead for the hints the director/writer placed in the movie to tell you if a scene is imaginary or not. Jessica Alba is alive and they kept this from him. Maybe they were afraid he might kill her, or maybe she's dead and it's all in his head, seeing as he was obsessed with her. It's difficult to tell at this point if the final scene is real or not, so either versions seem fine.