Ensure libcontainer follows correct symlink in scope

Closes #5774

This takes the original work and moves the follow symlink func into a pkg outside of docker uitls