Ensure dash compatibility.

Made changes to ensure dash compatibility:
- removed the let statement to overwrite variables, skipping it will work as well
- replaced appearences of source with the .
- replaced the == comparator with = 
- made all used paths absolute, otherwise it won't work when you start xplanet not from its root directory
- wrap mathematical additions in two braces
- replaced array handling and built other mechanism to make the same work