Fixed wrong usage of $tmpFile in Swift backend

Change-Id: I21293be38c53b4dca3030c26a201f70d8ed243f3
(cherry picked from commit f46cd2a593195953e9bd30694bd58486b0910bbe)