You only need to replace this line:
$outputFilePath="c:\Temp\" + $listName + ".xlsx"
with this line:
$outputFilePath="c:\Temp\" + ($listName -replace "/","-") + ".xlsx"
There are more characters that should be avoided in file and directory names than just a forward slash!