Fixed some minor SelectBox bugs.
Better canWrite, doesn't overwrite existing file.

#1301
#1388
Merge branch 'origin/master'