First , is the name of the script you are calling .getdir or just getdir? Your example command says ./getdir somedir, but you refer to it as .getdir in your variable and comment.
If that's just a typo, it looks to me that there may be a discrepancy on what getdir does and/or takes as input and what you are asking it to do. In your example, getdir takes a directory as input, but in your script, you pass a parameter. Is this parameter a directory? Maybe getdir expecting a path and your parameter is just a name (or vise versa)?
Sorry it is a hidden file so it is .getdir And the parameter that it takes is just a hashed value of some text and the .getdir script unhashes it.
When I run the .getdir script in the console with the parameter it works fine. But as I said it doesnt seem to be doing anything in the main script. I was very curious about the syntax of that line that you quoted and I thank you for your reply.