bugfixes for checkouts of deteched heads
add Errornames is prep for switching from codes

the code property in FileError is deprecated, need to switch to just
using the name property instead and will use this map instead of hard
coding strings everywhere.
adding entries to dircache