change to directory before opening

this addresses #22