Update build process to have only one copy of libraries

Before dist files were coppied to demo directory later to be coppied to gh-pages
directory. It was done due to fact that demo html files were referencing
JS and CSS resources from the same folder. In order to avoid such type of copying
a text-replace was used. Now all files may reference dist directory and on copy to
gh-pages references will be changes to point same directory.