add system tests for replacing symlinks and directories