Whistling in the dark is a common enough expression in the UK. The OED defines it as "to put on a brave front; to make a pretence of confidence".
So I’m with tcward - the image is of someone walking alone in the dark, feeling nervous, but managing a dry whistle in order to (perhaps) cheer themselves up and also to convince anyone out there that they’re not afraid.
As for "whistling Dixie", isn’t it a reference to the song Dixie Land? Cassell’s Dictionary of Slang gives two uses of the phrase to whistle Dixie: either "to engage in wishful fantasies" or "to brag without substance". I can see the mental connection with both wishful thinking and bragging without substance, if someone whistling Dixie is thought to be imagining that the South might rise again.
So if you’re not just whistlin’ Dixie, you’re saying something of substance, something that has real-world relevance.
Disclaimer: The author specifically states that none of the above should be taken in any way to necessarily reflect the opinion of the author concerning any political or social stance that might be taken by any or all inhabitants of the southern states of the USA, either now or at any time in the past or future.
Grant