helper: add split_path() and is_path_safe()
security: exit when illegal path received