tar runs fine from a command line but not in script?