posix compatibility

- use awk instead of date for generating a random id for remsh
- use -f instead of -e for testing the existence of a file