Replacing the readlink with a dirname to the passed command line options