In file.c, getcwd() can return NULL by different causes.

One that got me mad is that a shell is in a directory that someone removed. 'ls' still works there, but any fossil operation returns 'pwd too big: max 1999'.

Showing strerror(errno) would have tought me what to do, as I only discovered the cause of getcwd()==0 through gdb. My pwd was that isn't very big. :)