Use PATH_MAX as buffer size for buffers containing paths.

Docker-DCO-1.1-Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
PATH_MAX is supposed to contain the trailing '\0' as per linux/limits.h, however, there is no harm in doing PATH_MAX - 1 :) Also, the buffer will be '\0' terminated, so there is no need for memset.