fix py3 support for sourcecode directive

added sourcecode to the functional test so it's tested *somewhere*.
fixes #963
Merge pull request #1002 from russkel/sourcecodefix

fix py3 support for sourcecode directive