Replace PATH_MAX with dynamic memory allocation

Signed-off-by: Sebastian Ramacher <sramacher@debian.org>
Merge pull request #6 from sebastinas/pathmax

Replace PATH_MAX with dynamic memory allocation