Lineinfile atomic

removes main race condition as it now writes to temp file instead of dest file, now no chance of programs reading file in the middle of write.

There is still a race in that the file might change between being read and updated but this should be minor and always consistent.