checking out rails takes a long time, let cp -r for performance
adds some missing basedirs in the docs generator
chdir to basedir to simplify paths