makes lineinfile a bit safer by using atomic rename

I hope that new branch won't be pulling in extra commits like last time