Fixes

Coverity fixes plus https://github.com/inliniac/suricata/pull/846

Prscript:
- PR build: https://buildbot.suricata-ids.org/builders/inliniac/builds/200
- PR pcaps: https://buildbot.suricata-ids.org/builders/inliniac-pcap/builds/120