magit-log-edit: shorten long lines
magit-get-top-dir: for default-directory by default

Make argument CWD optional; it it is unspecified
or nil default to the default-directory.