Use PATH_MAX as buffer size for buffers containing paths.

Docker-DCO-1.1-Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
@vmarmol Alright, done -- sorry about the PATH_MAX - 1 change. I switched environments and the change got reverted by mistake :)