Use PATH_MAX as buffer size for buffers containing paths.

Docker-DCO-1.1-Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
We should still need to do the memset though :) snprintf() does not guarantee the last \0 if it hits the char limit.