Remove unused variable script_dir

This variable used to be set based on either $HOME or $script_path. However,
$script_path is no longer set, so when $HOME is unset there will be an
'dirname: missing operand' error message. $script_dir is no longer used
either, so we can safely remove it entirely.
Use MaxMetaspaceSize rather than MaxPermSize on Java 8

@jroper points out that class metadata has to go somewhere, and it's new
name is 'Metaspace' - not 'PermGen':

https://github.com/sbt/sbt-launcher-package/pull/66#issuecomment-57407643

http://java.dzone.com/articles/java-8-permgen-metaspace
Merge pull request #78 from rtyley/add-metaspace-support

Use MaxMetaspaceSize rather than MaxPermSize on Java 8
Merge pull request #75 from raboof/remove_unused_variable_mergable

Remove unused variable script_dir
Fixed incorrect sbtopts lines processing

It used `for` loop which is known to work incorrectly with spaces. This
commit changes it to `while read` loop. This allows more complex options
to be specified in sbtopts files.

Fixes #80
Merge pull request #82 from netvl/lines-loop-fix

Fixed incorrect sbtopts lines processing
use JAVA_OPTS instead of java_opts.