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 I made the change, but still not convinced :) From all that I read and re-read the only time when snprintf won't write \0 is when the buf size is 0 (on linux).