Increase shell compatibility

- replace source with . which is recognized by more shells
- replace function syntax with a more generic one

The new syntax works on Debian/Ubuntu default shell dash as well as on bash