Flaming_Sword's Coverity fixes #2

Flaming_Sword's second set of fixes for a number of current Coverity reported issues.

See further discussion on HLP forums here: http://www.hard-light.net/forums/index.php?topic=85796.0