The screenwriter talks about adapting Andy Weir's novel for the screen, and the challenge of writing dialogue for smart characters.