(QENG-299) applied review feedback

two specific things were done here: removal of unnecessary pe_dir
setting in spec tests, and changing HEREDOC usage to string array
join calls for better readability