Catching an error when path to Dockerfile is not sanitary