BF: Fix removing from wrong end of library path

strip('co') was called on the library path to remove letters from both
sides of the path. Actually only removing from the end is needed. Also
some platforms use absolute paths starting with letters. Here is was
assumed that the path either always start with upper case letters or
never with 'c' or 'o'. These faults were fixed by now using rstrip().