Let's check the syntax. Bear in mind that the SD card functions are proper functions that require parentheses for their arguments:
> dir()
> dir // you can omit the parens if there are no args
> type("sdtest.txt")
> exists("sdtest.txt")
Does that help?
-br