Fix copy and paste spacing errors

Solution based on the question "Phantom spaces in listings (pdf)" and
answer on stackexchange

http://tex.stackexchange.com/questions/4911/phantom-spaces-in-listings-pdf