clean up symlink code
add tests for symbolic link support