local would leave literal ".." in path due to code ignoring results
from calling realpath().