Does this work for you?acSendKeys("%d") --change to address bar
acDelay(150)
acSendKeys("^c") --copy the URL
acDelay(150)
local sTemp = acGetClipboardText() --get the URL from the clipboard
acSetClipboardText(string.reverse(string.sub(string.reverse(sTemp),string.find(string.reverse(sTemp), "/", 1),string.len(sTemp)))) --set the clipboard to the parent directory
acDelay(150)
acSendKeys("%d") --check to the address bar
acDelay(150)
acSendKeys("^v") --paste the modified URL
acDelay(150)
acSendKeys("~") --press Enter
Tested in Chrome, Firefox, and IE on my machine. You may have to play with the acDelay(150) numbers (increase) if you're having timing issues (I had to increase to 150 for IE to work properly)