In some places it was assumed that PATH_MAX does not include a terminating null character. Increases PATH_MAX to 1024 to get in sync with NetBSD. Required some rewriting in AVFS to keep memory usage low (the stack in use by a thread is very small).