If the example contains a docroot and/or approot, use it instead of the source directory

No bashism in the shell script, therefore do not require bash but a bourne shell
Merge pull request #32 from pgquiles/fix-docroot

Fix docroot