It's a bit confusing, though, if the user sees 'you manage to flee', but is left in the same place.

In general, you don't need to check for a valid direction - if there isn't a tile there, the game won't let you move that way. The general message about the undergrowth being too thick isn't quite right for a cave, admittedly.