Added BASEPATH and SUBFOLDER configs for PIDFILE

Checks if the path exists, if it does not, it is created, if there is
an error a message is printed with the problematic path.