Add .gitignore and set up directory hierarchy.