resolves #1065 ensure space before callout on last line of listing

- ensure space is present before callout on final line of listing
- restore callouts to correct location when using Pygments with linenums