lpar: Use $ENV{'HOME'} instead of ~

'~' won't work when there's no shell expansion.

bc1bcab2-94c7-11e3-94f7-001f3b596ec9
lpar: Define and use $lpar_file

34530a4a-94c8-11e3-995f-001f3b596ec9
lpar: Add some rudimentary file locking

Doing it the simple way by creating lockdirs to allow the use of
system(). Works great though, as mkdir() is atomic.

b364b636-94cc-11e3-ae82-001f3b596ec9
Merge branch 'lpar.add-locking'

* lpar.add-locking:
  lpar: Add some rudimentary file locking
  lpar: Define and use $lpar_file
  lpar: Use $ENV{'HOME'} instead of ~

30211cc8-94cd-11e3-8495-001f3b596ec9