I think they knew before filming the last few episodes that the show was being cancelled so they could easily have altered the last minute of the show if they had wanted to. Obviously, they had a reason for leaving the cliffhanger and I think it's more than simply that they expected a fifth season.
I'm not a fan of cliffhangers where things just happen basically out of the middle of nowhere - it felt like a deus ex machina in reverse. I also thought the episode felted compressed. I enjoyed it but you can almost sense the urgency to rush out some sort of resolution then the ending, to...