Set chmod 777 for the tmpFile

Fix the error ```open pandoc**********: permission denied```.