Fix Msf::Exploit::EXE payload generation

This is in reference to http://dev.metasploit.com/redmine/issues/8367

@Meatballs1, can you put together some practical validation steps? I'm having trouble reproducing the problem with psexec, so I'm not 100% certain that this actually addresses. I do have a spec, though, for the code areas you indicated in your RM bug.