Improvements to version code

1. Export string instead of function as suggested by bakkerthehackker
2. Use path.join() instead of string concat for better protability