Fixed condition check on item existence in list

Previously, 'set $path...' ran regardless of the result of 'and not contains...'. This fixes _append_path to actually use the result of the condition check.
Merge pull request #22 from fissionxuiptz/patch-1

Fixed condition check on item existence in list